xen.git
18 years ago[IA64] xenoprof/ia64 howto
Alex Williamson [Thu, 17 Jan 2008 19:11:01 +0000 (12:11 -0700)]
[IA64] xenoprof/ia64 howto

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Cleanup duplicate kdump_find_rsvd_region()
Alex Williamson [Thu, 17 Jan 2008 19:05:44 +0000 (12:05 -0700)]
[IA64] Cleanup duplicate kdump_find_rsvd_region()

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
18 years ago[IA64] Fix start_kernel() to call init_xenheap_pages() with correct range.
Alex Williamson [Thu, 17 Jan 2008 19:05:44 +0000 (12:05 -0700)]
[IA64] Fix start_kernel() to call init_xenheap_pages() with correct range.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Improve boot loader data moving logic in start_kernel()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Improve boot loader data moving logic in start_kernel()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Clean up of context switch code
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Clean up of context switch code

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Introduce xenheap_megabytes boot option
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Introduce xenheap_megabytes boot option

Now xenheap size isn't limited by DTR mapping. So we can set it larger size.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate mca related objects from domheap instead of xenheap
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate mca related objects from domheap instead of xenheap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate percpu area from domheap
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate percpu area from domheap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate vm buffer before boot allocator
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate vm buffer before boot allocator

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Don't pin xenheap down. Now it's unnecessary.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Don't pin xenheap down. Now it's unnecessary.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Fix current->domain->arch.shadow_bitmap reference
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Fix current->domain->arch.shadow_bitmap reference

Don't reference current->domain->arch.shadow_bitmap in dirty_bit fault handler.
Instead copy it to arch_vcpu.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Don't refer struct domain from GET_VA_VCPU_VHPT_MADDR()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Don't refer struct domain from GET_VA_VCPU_VHPT_MADDR()

So far, current->domain->arch.flags.has_pervcpu_vhpt is used.
Instead use current->arch.vhpt_page.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Don't refer domain->arch.rid_bits from optfaults.S
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Don't refer domain->arch.rid_bits from optfaults.S

Copy it to struct arch_vcpu.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate privregs from domain heap for VTi domain
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate privregs from domain heap for VTi domain

- Pin privregs down with both dtr/itr so that privregs can be allocated
  from the domain heap
- Introduce vmx_vpd_pin()/vmx_vpd_unpin().
  The vpd area is pinned down when current.  But two functions,
  update_vhpi() and alloc_vpd() are exceptions.
  We have to pin down the area before PAL call.
- Minor twist context switch not to use unpinned vpd area.
  vmx_load_state() needs the vpd area pinned down.
  Call it after vmx_load_all_rr()
- Fix vmx_load_all_rr()
  vmx_switch_rr7() sets psr.ic = 0 so that clearing psr.ic before calling
  vmx_switch_rr7() doesn't make sense.
- Improve vmx_switch_rr7()
  It sets psr.ic = 0 after switching to physical mode. But it can be
  done at the switching time.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Remove duplicated declarations vmx_save_state()/vmx_load_state()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Remove duplicated declarations vmx_save_state()/vmx_load_state()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Remove the unused constant, IA64_DOMAIN_SHARED_INFO_VA_OFFSET
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Remove the unused constant, IA64_DOMAIN_SHARED_INFO_VA_OFFSET

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate PV privregs pages from domain heap
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate PV privregs pages from domain heap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate shared_info page from domain heap
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate shared_info page from domain heap

Hyperprivops were accessing shared_info page with psr.ic = 0.
They are accessing the page via current_psr_i_addr.
We can set it to shared_info_va which is mapped by IA64_TR_SHARED_INFO.
Thus we can allocate the page form domain heap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Remove unused IA64_DOMAIN_SHARED_INFO_OFFSET
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Remove unused IA64_DOMAIN_SHARED_INFO_OFFSET

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Fix ia64_switch_to()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Fix ia64_switch_to()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix MCA handling from xen relocation changes
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix MCA handling from xen relocation changes

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
18 years ago[IA64] Rearrange IA64_TR_ definitions to use from lower value
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Rearrange IA64_TR_ definitions to use from lower value

SDM vol2 4.1.1.1 says that:
 "software should allocate contiguous translation registers starting
  at slot 0 and continuing upwards."

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Allocate struct vcpu from domheap.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Allocate struct vcpu from domheap.

Now there's no constraint to allocate struct vcpu from xenheap.
So allocate it from domain heap.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix ia64_reload_tr in mca_asm.S
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix ia64_reload_tr in mca_asm.S

- DTR for stack comparison should be done with xen heap.
- cpu_kr current offset contains (physicall address >> IA64_GRANULE_SHIFT)
  so the comparison was done with the wrong value.
- When mapping VHPT area, overlapping should be avoided.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Remove init_task definition
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Remove init_task definition

init_task in kernel area shouldn't be referenced.
The corresponding address in the identity mapping area should be used.
i.e. ia64_tpa(init_task) + PAGE_OFFSET, because ia64_switch_rr7() and
vmx_switch_rr7() assume that stack is in indentity mapping area.
To make it sure, remove init_task definition.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix start in head.S
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix start in head.S

Later stack was allocated from domain heap, so that stack should be
mapped if necessary.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix ia64_switch_to() so that it checks overlap with xenheap.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix ia64_switch_to() so that it checks overlap with xenheap.

- Remove unncessary movl if possible
- Fix overlapping check
- re-add #ifdef XEN.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix ia64_swith_to() so that it doesn't check with init_task
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix ia64_swith_to() so that it doesn't check with init_task

init_task isn't used directly so that comparison with init_task in
ia64_switch_to() is pointless. Remove the comparison.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Cleanup white space in ia64_switch_to()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Cleanup white space in ia64_switch_to()

Use tab instead of 4 space.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Make vmx_swtich_rr7() consistent to ia64_new_rr7() so that it maps stack.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Make vmx_swtich_rr7() consistent to ia64_new_rr7() so that it maps stack.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Cleanup white space of vmx_switch_rr7. use tab.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Cleanup white space of vmx_switch_rr7. use tab.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Update a stale comment in xenasm.S
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Update a stale comment in xenasm.S

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Move asmmacro.h from linux-xen to linux
Alex Williamson [Fri, 14 Dec 2007 20:51:02 +0000 (13:51 -0700)]
[IA64] Move asmmacro.h from linux-xen to linux

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
18 years ago[IA64] Move PERFC() from asmmacro.h
Alex Williamson [Fri, 14 Dec 2007 20:49:04 +0000 (13:49 -0700)]
[IA64] Move PERFC() from asmmacro.h

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
18 years ago[IA64] vti fault handler clean up: consolidate vmx_interrupt and vmx_dispatch_interrupt
Alex Williamson [Fri, 14 Dec 2007 20:46:49 +0000 (13:46 -0700)]
[IA64] vti fault handler clean up: consolidate vmx_interrupt and vmx_dispatch_interrupt

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: fix vmx_break_fault and vmx_ia64_handle_break
Alex Williamson [Fri, 14 Dec 2007 20:44:06 +0000 (13:44 -0700)]
[IA64] vti fault handler clean up: fix vmx_break_fault and vmx_ia64_handle_break

vmx_break_fault and vmx_ia64_handle_break() should check cr.ipsr.vm bit
so that they can handle break fault in xen.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: introduce VMX_SAVE_MIN_WITH_COVER_NO_PANIC
Alex Williamson [Fri, 14 Dec 2007 20:40:29 +0000 (13:40 -0700)]
[IA64] vti fault handler clean up: introduce VMX_SAVE_MIN_WITH_COVER_NO_PANIC

For later use.  This is a version of VMX_SAVE_MIN_WITH_COVER which
doesn't call vmx_panic even when p6 is true.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: improve the VTi domain fault handler
Alex Williamson [Fri, 14 Dec 2007 20:37:57 +0000 (13:37 -0700)]
[IA64] vti fault handler clean up: improve the VTi domain fault handler

Improve the VTi domain fault handler panic path.  Currently when a
VTi fault handler finds something wrong, it enters an infinite loop
in vmx_panic with interrupts masked.  It makes sense if hw-based
debugger is available.  However in most cases this isn't available,
especially for normal users.  This patch makes those panic paths
more user friendly by printing out the panic message.  The old
behaviour is left with vmx_panic configuration.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: make VMX_DO_SAVE_MIN aware of fault in xen
Alex Williamson [Fri, 14 Dec 2007 20:33:01 +0000 (13:33 -0700)]
[IA64] vti fault handler clean up: make VMX_DO_SAVE_MIN aware of fault in xen

Current VMX_DO_SAVE_MIN is simplified from DO_SAVE_MIN assuming
that the faults are in VTi guest. Discard the assumption and make
code more generic.  Make it able to handle faults in both guest and xen.
Set pKStk and pUStk in VMX_DO_SAVE_MIN and use them to get the correct
place to save registers so that don't overwrite guest mode register
in vmx fault handler.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: clean up of vmx_ivt.S
Alex Williamson [Fri, 14 Dec 2007 20:29:42 +0000 (13:29 -0700)]
[IA64] vti fault handler clean up: clean up of vmx_ivt.S

Trivial clean up of vmx_ivt.S
- Use VMX_SAVE_MIN_WITH_COVER instead of VMX_SAVE_MIN_WITH_COVER_R19
  if it isn't necessary.
- Fix vmx_dispatch_interrupt, vmx_interrupt.  psr.i shouldn't be set.
  ia64_handle_irq() should be called with interrupt masked.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: clean up VMX_DO_SAVE_MIN
Alex Williamson [Fri, 14 Dec 2007 20:26:38 +0000 (13:26 -0700)]
[IA64] vti fault handler clean up: clean up VMX_DO_SAVE_MIN

- p15 was set twice with same condition
- r1 was set to r21 via r16. using r16 doesn't make sense.
  direct set r1 to r21.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: clean up ia64_leave_nested
Alex Williamson [Fri, 14 Dec 2007 20:24:44 +0000 (13:24 -0700)]
[IA64] vti fault handler clean up: clean up ia64_leave_nested

The rse backing store is unchanged when nested interrupted case so that
bsp related operation doesn't make sense.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: make VMX_DBG_FAULT aware of fault in xen
Alex Williamson [Fri, 14 Dec 2007 20:12:17 +0000 (13:12 -0700)]
[IA64] vti fault handler clean up: make VMX_DBG_FAULT aware of fault in xen

When fault occurs in xen, r21 doesn't point to vcpu so it needs to be
retrieved from cpu_kr.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: make VTI_DEBUG configurable
Alex Williamson [Fri, 14 Dec 2007 20:09:02 +0000 (13:09 -0700)]
[IA64] vti fault handler clean up: make VTI_DEBUG configurable

And make IVT_DEBUG_MAX changable.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: vmx_vit.S white space & stale comments
Alex Williamson [Fri, 14 Dec 2007 20:07:01 +0000 (13:07 -0700)]
[IA64] vti fault handler clean up: vmx_vit.S white space & stale comments

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] vti fault handler clean up: vmx_minstate.h white space
Alex Williamson [Fri, 14 Dec 2007 20:04:27 +0000 (13:04 -0700)]
[IA64] vti fault handler clean up: vmx_minstate.h white space

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Remove is_vti arch flag
Alex Williamson [Fri, 14 Dec 2007 19:53:03 +0000 (12:53 -0700)]
[IA64] Remove is_vti arch flag

arch.is_vti is a duplicate of is_hvm.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years agohvm: Extboot support for Xen
Keir Fraser [Thu, 17 Jan 2008 16:39:14 +0000 (16:39 +0000)]
hvm: Extboot support for Xen

This patch adds extboot to Xen.  It should be pretty harmless as the
moment because it's never enabled.  extboot allows arbitrary block
devices to be used to boot guests including SCSI and PV disks.  I've
tested it with both Windows and Linux guests in QEMU.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
18 years agominios: support several netfronts
Keir Fraser [Thu, 17 Jan 2008 15:50:48 +0000 (15:50 +0000)]
minios: support several netfronts

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoxm: Fix xm restore command.
Keir Fraser [Thu, 17 Jan 2008 15:23:47 +0000 (15:23 +0000)]
xm: Fix xm restore command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoMinor correction in xm man page for 'xm create'.
Keir Fraser [Thu, 17 Jan 2008 15:21:35 +0000 (15:21 +0000)]
Minor correction in xm man page for 'xm create'.
From: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agominios: add xenbus token support and separate watch event queues
Keir Fraser [Thu, 17 Jan 2008 15:20:02 +0000 (15:20 +0000)]
minios: add xenbus token support and separate watch event queues

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agotools: disable lomount and miniterm by default
Keir Fraser [Thu, 17 Jan 2008 15:18:38 +0000 (15:18 +0000)]
tools: disable lomount and miniterm by default

lomount is a tool which reads and parses a partition table in a disk
image block device and then uses mount -o ...offset=... to mount it.
This is not an ideal approach.  For example, if the intended
filesystem has corrupted metadata the kernel's filesystem driver may
start to write outside of the intended region.  This might even be
exploitable in some perverse circumstances.

Nowadays people wanting to do this should use kpartx, which uses
devmapper to create appropriate range mappings.  So lomount should be
disabled.

miniterm may well be useful but it is a clone-and-hack of an upstream
project and is currently built but not installed by default, partly
because it doesn't make sense to install on the dom0 which it might be
trying to debug.

It is probably useful to retain these two programs in the source tree
but IMO they should no longer be built by default.

The attached patch does these things:
 * CONFIG_LOMOUNT and CONFIG_MINITERM in Config.mk
   can enable and disable these programs
 * They are disabled by default
 * If CONFIG_MINITERM=y it is still built but not installed.
   make -C tools/misc/miniterm install  will install it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agotools: LDFLAGS in link lines
Keir Fraser [Thu, 17 Jan 2008 15:17:22 +0000 (15:17 +0000)]
tools: LDFLAGS in link lines

LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agonetwork scripts: SUSE has sensible use of ifup nowadays
Keir Fraser [Thu, 17 Jan 2008 15:14:17 +0000 (15:14 +0000)]
network scripts: SUSE has sensible use of ifup nowadays

While wading through the patches made to Xen by OpenSUSE in their
[s]rpm, I found that they have removed various special casing for ifup
on ther distribution.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agotools/docs: Fix example and default IP addresses.
Keir Fraser [Thu, 17 Jan 2008 15:13:40 +0000 (15:13 +0000)]
tools/docs: Fix example and default IP addresses.

In various places in documentation and code, IP addresses are provided
as examples, defaults, or dummy configuration.  In general the
specific IP addresses used in Xen are not always appropriate.  (For
example, 1.2.3.4 is used in a few places!)

The following addresses should be used:
 * For examples and documentation, 192.0.2.0/24.  (See RFC3330.)
 * For defaults for private networks, a random network from RFC1918.
   I have randomly selected 172.30.206.0/24 for this purpose and
   documented this in at the only registry I know of,
   www.ucam.org/cam-grin.  This network should henceforth be used for
   default configurations of local bridges, test networks, etc. in
   Xen tools.

The following addresses should NOT be used:
 * 10.0.*.*, 10.1.*.*, 192.168.0.*, 192.168.1.*, etc.  Using these
   addresses gives greatly increased likelihood of collision, as
   ignorant network administrators and reckless middlebox vendors
   often pick networks from the bottom of 10/8 and 192.168/16.
 * 169.254.*.*.  These are reserved for zeroconf (ad-hoc networking)
   and should not be used for Xen private networks, bridges, etc.,
   etc.  Use of these addresses by Xen scripts causes trouble on hosts
   (eg laptops) which find themselves in ad-hoc networking
   environments.  I think this is not hypothetical (!) since at least
   one Linux distribution have specific code to detect this case and
   cause Xen startup to fail iff the host already has an external
   zeroconf address.
 * 1.2.3.4.  WTF !?

I have also used 127.0.255.255 in one place where apparently a dummy
address is needed (some Linux kernels won't accept a lack of an NFS
server address).  If 127.0.255.255 is mistakenly used it is unlikely
to do any damage to real traffic even if it does escape into the
network at large.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agolibxen: Avoid declarations-after-statement (C++ coding style).
Keir Fraser [Thu, 17 Jan 2008 15:11:22 +0000 (15:11 +0000)]
libxen: Avoid declarations-after-statement (C++ coding style).
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
libxen: Use build-system CFLAGS and LDFLAGS.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agominios: add realloc
Keir Fraser [Thu, 17 Jan 2008 15:06:30 +0000 (15:06 +0000)]
minios: add realloc

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
18 years agominios: make stack size configurable
Keir Fraser [Thu, 17 Jan 2008 14:41:44 +0000 (14:41 +0000)]
minios: make stack size configurable

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
18 years agominios: add wait_event_deadline
Keir Fraser [Thu, 17 Jan 2008 14:41:12 +0000 (14:41 +0000)]
minios: add wait_event_deadline

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
18 years agominios: add trydown
Keir Fraser [Thu, 17 Jan 2008 14:40:55 +0000 (14:40 +0000)]
minios: add trydown

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: use ASSERT for BUG_ON
Keir Fraser [Thu, 17 Jan 2008 14:40:23 +0000 (14:40 +0000)]
minios: use ASSERT for BUG_ON

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Add exit_thread prototype. Make sure exit_thread doesn't
Keir Fraser [Thu, 17 Jan 2008 14:40:06 +0000 (14:40 +0000)]
minios: Add exit_thread prototype. Make sure exit_thread doesn't
return by accident.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Add noreturn attribute to do_exit
Keir Fraser [Thu, 17 Jan 2008 14:39:45 +0000 (14:39 +0000)]
minios: Add noreturn attribute to do_exit

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Optimize IA64's get_current()
Keir Fraser [Thu, 17 Jan 2008 14:39:21 +0000 (14:39 +0000)]
minios: Optimize IA64's get_current()

Let gcc access r13 itself, leading to better code

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
18 years agoUpdate API changelog for new feature flags.
Keir Fraser [Thu, 17 Jan 2008 13:03:22 +0000 (13:03 +0000)]
Update API changelog for new feature flags.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Allocate an unmapped guard page to separate ordinary low RAM
Keir Fraser [Thu, 17 Jan 2008 12:59:10 +0000 (12:59 +0000)]
hvm: Allocate an unmapped guard page to separate ordinary low RAM
from special pages (ioreq, xenstore, etc). This will stop some probe
functions (e.g., embedded in memtest) from stomping on the special
pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoamd hvm (svm): Print warning if NPT constraints on PAE are hit.
Keir Fraser [Wed, 16 Jan 2008 15:55:57 +0000 (15:55 +0000)]
amd hvm (svm): Print warning if NPT constraints on PAE are hit.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxenconsoled: Make slave pty raw during initialization.
Keir Fraser [Wed, 16 Jan 2008 13:44:18 +0000 (13:44 +0000)]
xenconsoled: Make slave pty raw during initialization.
(This avoids echo).

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years agox86: New feature flag XENFEAT_mmu_pt_update_preserve_ad.
Keir Fraser [Wed, 16 Jan 2008 13:27:59 +0000 (13:27 +0000)]
x86: New feature flag XENFEAT_mmu_pt_update_preserve_ad.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Reserve a CPUID feature bit to advertise new
Keir Fraser [Wed, 16 Jan 2008 11:44:41 +0000 (11:44 +0000)]
x86: Reserve a CPUID feature bit to advertise new
MMU_PT_UPDATE_PRESERVE_AD hypercall command.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Document the new MMU_PT_UPDATE_PRESERVE_AD hypercall.
Keir Fraser [Tue, 15 Jan 2008 21:23:37 +0000 (21:23 +0000)]
x86: Document the new MMU_PT_UPDATE_PRESERVE_AD hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years ago-DNDEBUG for hypervisor only
Keir Fraser [Tue, 15 Jan 2008 18:50:44 +0000 (18:50 +0000)]
-DNDEBUG for hypervisor only
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agolibxen: Fix function prototype.
Keir Fraser [Tue, 15 Jan 2008 18:48:32 +0000 (18:48 +0000)]
libxen: Fix function prototype.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agoMerge with ia64 tree.
Keir Fraser [Tue, 15 Jan 2008 14:39:23 +0000 (14:39 +0000)]
Merge with ia64 tree.

18 years agox86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Keir Fraser [Tue, 15 Jan 2008 14:32:15 +0000 (14:32 +0000)]
x86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoUpdate version to 3.3-unstable.
Keir Fraser [Tue, 15 Jan 2008 14:27:15 +0000 (14:27 +0000)]
Update version to 3.3-unstable.

18 years agoxend: Remove hardcoded (and apparently unused) xend version.
Keir Fraser [Tue, 15 Jan 2008 14:24:05 +0000 (14:24 +0000)]
xend: Remove hardcoded (and apparently unused) xend version.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
18 years agohvm, x86: Add QEMU BIOS menu for choosing boot device.
Keir Fraser [Tue, 15 Jan 2008 14:22:50 +0000 (14:22 +0000)]
hvm, x86: Add QEMU BIOS menu for choosing boot device.

The attached patch implements a mini BIOS menu for choosing a
non-default
boot device. When a guest starts it'll display

   'Press F10 to select boot device'

And wait 3 seconds, before continuing with the normal boot device. If
they press the F10 key, a menu is shown allowing a choice between
floppy, harddisk, cdrom and network (PXE).

I can't take credit for this originally - Jeremy Katz wrote it for
KVM, I merely re-diffed the patch to work against Xen's QEMU/BIOS code
tree. It has been tested in Fedora successfully against 3.1.x and 3.2.x

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
CC: Jeremy Katz <katzj@redhat.com>
If more than one boot device has been selected, the currently selected
number displayed in the menu is wrong.

Signed-off-by: Stefano Stabellini <stefano.stabellini@citrix.com>
18 years agoblktap: factor out linux specific code
Keir Fraser [Tue, 15 Jan 2008 14:17:22 +0000 (14:17 +0000)]
blktap: factor out linux specific code
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years ago[IA64] Fix security vulnerability
Alex Williamson [Tue, 15 Jan 2008 14:07:01 +0000 (07:07 -0700)]
[IA64] Fix security vulnerability

DomU can map any other domain's memory.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
18 years agox86: INT3 and INTO trap gates should have DPL==3.
Keir Fraser [Tue, 15 Jan 2008 11:29:15 +0000 (11:29 +0000)]
x86: INT3 and INTO trap gates should have DPL==3.
This was broken by c/s 16667 (gdbstub changes).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoAdded tag 3.2.0-rc6 for changeset 9facc624a238
Keir Fraser [Sun, 13 Jan 2008 10:50:18 +0000 (10:50 +0000)]
Added tag 3.2.0-rc6 for changeset 9facc624a238

18 years agoUpdate version to xen-3.2.0-rc6
Keir Fraser [Sun, 13 Jan 2008 10:50:13 +0000 (10:50 +0000)]
Update version to xen-3.2.0-rc6

18 years agox86: Fix PV PIT handler after previous changeset.
Keir Fraser [Sat, 12 Jan 2008 11:26:04 +0000 (11:26 +0000)]
x86: Fix PV PIT handler after previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Improve in-Xen PIO emulation to better handle string PIO
Keir Fraser [Sat, 12 Jan 2008 11:13:57 +0000 (11:13 +0000)]
hvm: Improve in-Xen PIO emulation to better handle string PIO
instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agosvm: Properly mask unsupported bits in CPUID_80000001_ECX.
Keir Fraser [Sat, 12 Jan 2008 09:29:38 +0000 (09:29 +0000)]
svm: Properly mask unsupported bits in CPUID_80000001_ECX.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: hpet: Tidy up hpet_to_ns_limit calculation.
Keir Fraser [Fri, 11 Jan 2008 11:01:36 +0000 (11:01 +0000)]
hvm: hpet: Tidy up hpet_to_ns_limit calculation.
Suggested by Haitao Shan @ Intel.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovmxassist: Emulate CLTS.
Keir Fraser [Fri, 11 Jan 2008 10:59:48 +0000 (10:59 +0000)]
vmxassist: Emulate CLTS.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
Keir Fraser [Fri, 11 Jan 2008 10:53:44 +0000 (10:53 +0000)]
x86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
vmexit handling, before IO-APIC can be EOIed or unmasked and resample
the fake INTx line.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Fix near CALL/JMP <reg,mem>. Broken by c/s 16491.
Keir Fraser [Thu, 10 Jan 2008 22:53:43 +0000 (22:53 +0000)]
x86_emulate: Fix near CALL/JMP <reg,mem>. Broken by c/s 16491.
Thanks to AMD for narrowing this one down.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Certain opcodes are only valid with a memory operand.
Keir Fraser [Thu, 10 Jan 2008 22:52:40 +0000 (22:52 +0000)]
x86_emulate: Certain opcodes are only valid with a memory operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoFix network-bridge shell quoting.
Keir Fraser [Thu, 10 Jan 2008 15:30:46 +0000 (15:30 +0000)]
Fix network-bridge shell quoting.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agoAdded tag 3.2.0-rc5 for changeset 36bb2ab4722733d919d32e4555eb46cc6a06cb8f
Keir Fraser [Wed, 9 Jan 2008 22:21:58 +0000 (22:21 +0000)]
Added tag 3.2.0-rc5 for changeset 36bb2ab4722733d919d32e4555eb46cc6a06cb8f

18 years agoUpdate version to 3.2.0-rc5
Keir Fraser [Wed, 9 Jan 2008 22:21:49 +0000 (22:21 +0000)]
Update version to 3.2.0-rc5

18 years agox86_emulate: Fix handling of RIP-relative addressing.
Keir Fraser [Wed, 9 Jan 2008 22:21:28 +0000 (22:21 +0000)]
x86_emulate: Fix handling of RIP-relative addressing.
The handling of SHLD/SHRD introduced in 16696:b5b3e27f1af3f7 was
incorrect; thanks to Gary Grebus @ Virtual Iron for spotting it.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovt-d: Fix print_vtd_entries walk VTd mapping table.
Keir Fraser [Wed, 9 Jan 2008 10:35:52 +0000 (10:35 +0000)]
vt-d: Fix print_vtd_entries walk VTd mapping table.

DMA request to above guest physical memory will cause VTd fault, in
which print_vtd_entries() tries to walk VTd mapping table. However,
during walking, current Xen code didn't check if the PTE is valid and
may access to invalid memory address.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
18 years agohvm: hpet: Clamp period to sane values to prevent excessive looping in
Keir Fraser [Wed, 9 Jan 2008 10:32:13 +0000 (10:32 +0000)]
hvm: hpet: Clamp period to sane values to prevent excessive looping in
hpet_timer_fn(), or excessive numbers of set_timer() callbacks.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
Keir Fraser [Wed, 9 Jan 2008 10:11:31 +0000 (10:11 +0000)]
x86_emulate: Correct RIP-relative addressing offset for SHLD/SHRD with
immediate byte third operand.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoFix x86_emulate() handling of imul with immediate operands.
Keir Fraser [Wed, 9 Jan 2008 10:09:04 +0000 (10:09 +0000)]
Fix x86_emulate() handling of imul with immediate operands.

This fixes a repeatable crash in RHEL 4.2 ext2 filesystem during boot.

Signed-off-by: Gary Grebus <ggrebus@virtualiron.com>
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>